package com.xlp.factory;

import com.xlp.drink.*;

public class DrinkFactory {
    public static Drink makeDrink(int drinkSelected){
        switch (drinkSelected){
            case 1:
                return CoconutMilkTea.of();

            case 2:
                return SagoMilkTea.of();

            case 3:
                return HoneyMilkTea.of();

            case 4:
                return AlmondMilkTea.of();

            case 5:
                return AmericanCoffee.of();

            case 6:
                return LatteCoffee.of();

            default:
                throw new IllegalArgumentException("用户输入数据异常，点单失败！");
        }
    }
}
